<template>
    <div>
        <h3>等级列表</h3>
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <th>编号</th>
                    <th>会员名称</th>
                    <th>操作</th>
                </tr>
                <tr v-for="item in data.list">
                    <td>{{ item.Id }}</td>
                    <td>{{ item.Name }}</td>
                    <td>
                        <input type="button" value="修改" class="btn btn-success">
                        <input type="button" value="删除" class="btn btn-danger">
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref, reactive, onMounted } from 'vue'

onMounted(()=>{
    getLevel();
})

let data: any = reactive({
    list: []
})

const getLevel = () => {
    axios({
        method: 'get',
        url: '/api/Member/GetMemberLevels',

    })
        .then(res => {
            data.list=res.data
            console.log(res);

        })
        .catch(err => {
            console.log(err);

        })
}

</script>

<style scoped></style>